package com.xiaozhen.alarm.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xiaozhen.alarm.domain.AlarmStrategy;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * HISTORY
 *
 * @author zhenweisheng
 * @date 2021/10/25 9:25
 * @description:
 */
@Repository
public interface AlarmStrategyDao extends BaseMapper<AlarmStrategy> {

    /**
     * 查询策略列表
     *
     * @param page
     * @return
     */
    Page<AlarmStrategy> selectAlarmStrategyList(IPage<AlarmStrategy> page);

    /**
     * 查询告警配置的策略
     *
     * @param configId
     * @return
     */
    List<AlarmStrategy> selectAlarmConfigStrategy(@Param("configId") Long configId);
}
